import React, { ReactNode } from 'react'
import { Tabs } from 'antd'

/** 
 * 详情分组 
 */
const UdDetailGroup = (props: IUdDetailGroupProps) => {

  return (
    <Tabs type="card" defaultActiveKey={'0'}>
      {props.items.map((item, index) => {
        return <Tabs.TabPane key={index.toString()} tab={item.title}>
          {item.content}
        </Tabs.TabPane>
      })}
    </Tabs>
  )
}

interface IUdDetailGroupProps {
  items: IUdDetailGroupItem[]
}

interface IUdDetailGroupItem {
  title: ReactNode
  content: ReactNode
}

export { UdDetailGroup }
